#ifndef RTSP_METHOD_H
#define RTSP_METHOD_H

#include <string>
#include <ostream>
#include <iosfwd>

namespace rtsp {

enum class Method : unsigned
{
    kUnknown = 0,
    kOption ,
    kDescribe ,
    kAnnounce ,
    kSetup ,
    kPlay ,
    kPause ,
    kTearDown ,
    kGetParameter ,
    kSetParameter ,
    kRedirect ,
    kRecord
};

/** Convert a method enum to a string.

    @param method The method to convert
*/
std::string methodToString(Method method);

/** Attempt to convert a string to a method enum.

    The string comparison is case-insensitive.

    @return The corresponding method, or @ref method::kUnknown
    if no known method matches.
*/
Method stringToMethod(std::string s);

/// Write the text for a method name to an output stream.

std::ostream& operator<<(std::ostream& os, Method method);

} // rtsp

#endif //RTSP_METHOD_H

